home *** CD-ROM | disk | FTP | other *** search
- /***************************************************************************\
- |***************************************************************************|
- | |
- | File Name: Offscreen.h |
- | |
- | Contains: Implementation of _Offscreen GWorld buffers |
- | |
- | Written by: GeoWar |
- | |
- | Copyright: © 1995 by Apple Computer,Inc.,all rights reserved. |
- | |
- | **************************************************************************|
- | C h a n g e H i s t o r y (most recent first): |
- | **************************************************************************|
- | Vers Date Author Description |
- | ---- -------- ------ ----------------------------------------|
- | 2.12 12/15/99 GAW Added Get/Set default NewGWorld flags |
- | 2.10 6/16/99 GAW SetPort_offscreen now returns pixmap |
- | 2.8 12/16/98 GAW Added Get/Set Pixel Depth |
- | 2.7 12/16/98 GAW Added Get/Set Default CopyBit mask |
- | 2.6 12/3/98 GAW moved saved port/device info to struct |
- | 2.2 9/19/97 GAW Added Get/Set Default Pixel Depth |
- | 2.1 5/24/95 GAW First public version |
- | 0.0 5/18/95 GAW Initial version |
- |***************************************************************************|
- \***************************************************************************/
-
- #ifndef __OFFSCREEN__
- #define __OFFSCREEN__
-
- /**\
- |**| includes
- \**/
-
- #include <QDOffscreen.h>
-
- #if PRAGMA_ONCE
- #pragma once
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if PRAGMA_IMPORT
- #pragma import on
- #endif
-
- #if PRAGMA_STRUCT_ALIGN
- #pragma options align=mac68k
- #elif PRAGMA_STRUCT_PACKPUSH
- #pragma pack(push, 2)
- #elif PRAGMA_STRUCT_PACK
- #pragma pack(2)
- #endif
-
- /**\
- |**| typedefs
- \**/
-
- typedef struct Window_Offscreen {
- CGrafPtr windowPort;
- GDHandle windowDevice;
- GWorldPtr offscreenWorld;
- GDHandle offscreenDevice;
- UInt32 pixelslockedCount;
- CGrafPtr savedCGrafPtr;
- GDHandle savedGDHandle;
- SInt16 pixelDepth;
- RgnHandle maskRgnHdl;
- } Window_Offscreen,*Window_OffscreenPtr;
-
- /**\
- |**| Global function prototypes
- \**/
-
- extern Window_OffscreenPtr Open_Offscreen(WindowPtr pWindowPtr);
- extern Window_OffscreenPtr Open_OffscreenBuffer(WindowPtr pWindowPtr,const Rect* pRect);
- extern void Copy_Offscreen(Window_OffscreenPtr pWindow_OffscreenPtr);
- extern void Copy_OffscreenBuffer(Window_OffscreenPtr pWindow_OffscreenPtr,const Rect* sRect,const Rect* dRect);
- extern void Copy_Onscreen(Window_OffscreenPtr pWindow_OffscreenPtr);
- extern void Copy_OnscreenBuffer(Window_OffscreenPtr pWindow_OffscreenPtr,const Rect* sRect,const Rect* dRect);
- extern void Close_Offscreen(Window_OffscreenPtr pWindow_OffscreenPtr);
- extern void SetPort_Onscreen(Window_OffscreenPtr pWindow_OffscreenPtr);
- extern PixMapHandle SetPort_Offscreen(Window_OffscreenPtr pWindow_OffscreenPtr);
- extern void Save_Port(Window_OffscreenPtr pWindow_OffscreenPtr);
- extern void Restore_Port(Window_OffscreenPtr pWindow_OffscreenPtr);
- extern PixMapHandle Lock_Offscreen(Window_OffscreenPtr pWindow_OffscreenPtr);
- extern void Unlock_Offscreen(Window_OffscreenPtr pWindow_OffscreenPtr);
- extern void Set_OnscreenWindow(Window_OffscreenPtr pWindow_OffscreenPtr,WindowPtr pWindowPtr);
-
- extern SInt16 Get_DefaultPixelDepth(void);
- extern SInt16 Set_DefaultPixelDepth(const SInt16 pDefaultPixelDepth);
-
- extern SInt16 Get_PixelDepth(Window_OffscreenPtr pWindow_OffscreenPtr);
- extern SInt16 Set_PixelDepth(Window_OffscreenPtr pWindow_OffscreenPtr,const SInt16 pDefaultPixelDepth);
-
- extern RgnHandle Get_MaskRegion(Window_OffscreenPtr pWindow_OffscreenPtr);
- extern RgnHandle Set_MaskRegion(Window_OffscreenPtr pWindow_OffscreenPtr,RgnHandle pNewMaskRegion);
-
- extern GWorldFlags Get_DefaultGWorldFlags(void);
- extern GWorldFlags Set_DefaultGWorldFlags(const GWorldFlags pFlags);
-
- #if PRAGMA_STRUCT_ALIGN
- #pragma options align=reset
- #elif PRAGMA_STRUCT_PACKPUSH
- #pragma pack(pop)
- #elif PRAGMA_STRUCT_PACK
- #pragma pack()
- #endif
-
- #ifdef PRAGMA_IMPORT_OFF
- #pragma import off
- #elif PRAGMA_IMPORT
- #pragma import reset
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif __OFFSCREEN__
-